<template>
  <el-table
    :data="tableData"
    style="width: 100%">
    <el-table-column
      prop="title"
      label="标题"
      width="500">
    </el-table-column>
    <el-table-column
      prop="description"
      label="内容"
      width="500">
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: 'HelloWorld',
  data() {
    return {
      tableData: []
    }
  },
  created() {
    this.show();
  },
  methods: {
    show: function () {
      this.$axios.get('/api')
        .then(response => {
          debugger;
          response.data.result.data_list.forEach(item => {
            this.tableData.push({title:item.team_data.name.value,description:item.team_data.team_text})
          })
        })
        .catch(error => {
          console.log(error)
        });
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
